Adapting equalization gain and offset for data transmissions

ABSTRACT

A method for tuning an adaptive equalizer in order to receive digital signals from a transmission medium both coarse and fine tuning methods to adaptively equalize a signal received from the transmission medium. The coarse tuning method adjusts an equalizer such that the post equalized signal starts to resemble a known data pattern, such as an MLT3 data pattern. The coarse tuning method monitors and corrects for several things: illegal transitions, over equalization, statistical data pattern anomalies and saturation conditions. Fine tuning methods operate concurrently with the coarse tuning methods and function from the point at which the coarse tuning methods stop being efficient. Additionally, the fine tuning methods hold the waveform locked in. In addition to coarse tuning and fine tuning of the equalizer, the present invention also adjusts gain of the overall signal such that the post equalized signal is always a certain amplitude. It also corrects for offsets that may get superimposed on the signal as it passes through the receive channel and which may lead to erroneous bit decisions. The method is applicable to a variety of data communication standards including 100 Base-X, FDDI and ATM-155.

RELATED APPLICATIONS

This application is related to non-provisional application, entitled"Detecting Valid Data Patterns for Adapting Equalization Gain and Offsetfor Data Transmissions," by inventors, Ryan Hirth and Ruchi Wadhawan,having Ser. No. 08/912,896, and filing date Aug. 15, 1997, which wasfiled on the same day as the instant application, now abandoned; and tonon-provisional application, entitled "Detecting Overequalization forAdapting Equalization and Offset for Data Transmissions," by inventors,Ryan Hirth and Ruchi Wadhawan having Ser. No. 08/994,519, and filingdate Dec. 19, 1997, which was filed on the same day as the instantapplication, now pending.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to systems for transmitting data across acommunication channel, and more particularly to a method and anapparatus for adaptively equalizing a signal flowing through acommunication channel to compensate for transmission characteristics ofthe communication channel.

2. Description of Related Art

In digital data transmission systems, data in digital form istransmitted over media, such as wires or fiber optic cables, from atransmitter to a receiver. The digital data waveform is distorted withrespect to instantaneous frequency and amplitude as it propagates alongthe transmission media due to electrical noise, dispersion and theunique frequency response of the transmission medium. Electrical noiserefers to the unwanted components of an electrical signal that tend todisturb accurate transmission and processing of the signal. Dispersionrefers to pulse spreading of the signal, and is measured in units ofdistance per time of travel.

Receivers in a digital data transmission system ideally regenerate thetransmitted pulse train to its original form, without error. In digitalreceivers, this reconstruction is typically achieved by sampling thepulse train at a regular frequency, and at each sample instant making adecision as to the most probable symbol being transmitted. Typically, athreshold level is chosen to which the received signal is compared.Above this threshold level, a binary one is registered and below thethreshold level a binary zero is registered. Errors may occur in theanalog to digital conversion process due to various noises anddisturbances. The noise sources can be either external to the system,for example, atmospheric noise or equipment generated noise, or internalto the system. Internal noise is present in every communications systemand represents a basic limitation on the transmission and detection ofsignals.

The amplitude of the received signal may be degraded to the point wherethe signal to noise ratio at the decision instant may be insufficientfor accurate decisions to be made consistently. For instance, with highnoise levels, the binary zero may occur above the threshold and hence beregistered as a binary one. Moreover, the actual received datatransmissions may be displaced in time from the true transmission. Thisdisplacement, or intersymbol interference, of the transition is causedby a new pulse arising at the receiver before the previous pulse hasdied down. Intersymbol interference occurs due to pulse spreading causedby the dispersion of the transmission media. Variations in the clockrate and phase degradations also distort the zero crossings resulting indecision time misalignment. When a pulse is transmitted in a giventimeslot, most of the pulse energy will arrive in the correspondingtimeslot at the receiver. However, because of pulse spreading induced bythe transmission medium, some of the pulse energy will progressivelyspread into adjacent timeslots, resulting in an interfering signal. Theeffect of pulse spreading may be reduced by equalization, which providesa frequency dependent gain and phase delay to force the transmittedbinary one to be followed by zero at all neighboring decision times toconfine as much of the pulse energy as possible to the timeslot to whichit corresponds. The purpose of equalization, then, is to mitigate theeffects of signal degradation and intersymbol interference. Theequalizer thus optimizes the signal at the decision instant so that thebit error rate of the system may be minimized. Equalizers are basicallyfilters with frequency and phase responses that are typically inverse ofthat of the transmission medium.

Adaptive equalization involves adjusting the transfer function orfrequency response of the equalizing filter continuously during datatransmission. Some of the known adaptive equalization methods includeswitching capacitor techniques and digital signal processing techniques.Both of these methods require digital signal sampling at least two timesthe Nyquist rate or as much as between eight and twelve times thetransmitted data rate. Such a high sampling rate makes these methodsdifficult to apply in high speed applications. They also require largeamounts of circuitry, which translates into higher power consumption.

These equalizing filters used for adaptive equalization have a range ofsettings corresponding to various lengths of transmission medium. Thereceiver needs to figure out correctly and accurately the channelcharacteristics on the transmission medium the signal has been throughso that it can chose the appropriate filter setting to undo the effectof the transmission medium. This process is called tuning or "adapting"the equalizer.

Furthermore, existing adaptive equalization systems often reachmetastable states, and do not converge to the optimal equalization andamplification settings. Additionally, existing high speed adaptiveequalization systems are implemented in expensive bipolar technology,and not inexpensive CMOS technology or by combinations of digital signalprocessors DSP with specialized CMOS logic.

Some digital data transmissions use a ternary coding scheme known asMLT3. MLT3 uses three signal values: 1, 0 and -1, and ensures thatgroups of ones that are separated by zeros will always alternate inpolarity. In other words, data patterns such as 1, 1, 1, 0, 0, 0, 1, 1,1 and -1, -1, -1, 0, 0, 0, -1, -1, -1 are illegal because the ones donot alternate in polarity.

What is needed is a system for adaptively equalizing a digital datatransmission which rapidly converges to optimal equalization andamplification settings without getting caught in a metastable state.Additionally, what is needed is an adaptive equalization system whichcan be implemented in CMOS technology, with minimum power, area andcomplexity.

SUMMARY OF THE INVENTION

The present invention provides a method and an apparatus for tuning anadaptive equalizer in order to receive digital signals from atransmission medium. The present invention uses both coarse and finetuning methods to adaptively equalize a signal received from thetransmission medium. The coarse tuning method adjusts an equalizer suchthat the post equalized signal starts to resemble a known data pattern,such as an MLT3 data pattern. The coarse tuning method monitors andcorrects for several things: illegal code sequences, over equalization,statistical data pattern anomalies and saturation conditions.

Fine tuning methods operate concurrently with the coarse tuning methodsand function to improve channel performance by reducing intersymbolinterference, and otherwise, from the point at which the coarse tuningmethods stop being efficient. Additionally, the fine tuning methods holdthe waveform locked in, irrespective of base line wander events.

In addition to coarse tuning and fine tuning of the equalizer, thepresent invention also adjusts gain of the overall signal such that thepost equalized signal is always a certain amplitude. It also correctsfor offsets that may get superimposed on the signal as it passes throughthe receive channel and which may lead to erroneous bit decisions. Thepresent invention is applicable to a variety of networking standardsincluding, 100 Base-X, FDDI and ATM-155.

Thus, one aspect of the present invention can be characterized as amethod for detecting over equalization of a signal. Over equalizationimplies that the equalizer is trying to correct for a length oftransmission medium longer than what the signal has actually beenthrough for example by having too much gain at higher frequencies. Themethod operates by measuring the duration of zero values on the signal,and if the duration of these zero values is less than a minimuminterval, an over equalization condition exists on the signal. Oneembodiment includes adjusting an equalization amount or equalizersetting for the signal when an over equalization condition is indicated.

One aspect of the present invention can be characterized as a method fordetecting illegal code sequences in a signal. This method operates bymonitoring the signal, and indicating an illegal code sequence if thesignal makes a transition from a positive one value to a zero value andback to a positive one value. An illegal code sequence is also indicatedif the signal makes the transition from a negative one value to a zerovalue back to a negative one value. The occurrence of such events in thepost equalized waveform is used to gather information for tuning.

One aspect of the present invention can also be characterized as amethod of detecting the fact that valid data patterns are occurring inthe signal. The method operates by determining a measurement period witha timer. During the measurement period, the method monitors the signalfor a first number of consecutive one values, as well as monitoring thesignal for a second number of consecutive zero values. If the firstnumber of one values and the second number of zero values are detectedduring the measurement period, the method indicates that valid datapatterns occurred during the measurement period. The measurement periodis adequately long such that statistically the probability of detectingthese data patterns is adequately high. Nonoccurrence of these datapatterns is used as information for making tuning decisions.

The present invention can also be characterized as a method foradaptively equalizing a signal. The method operates in a systemincluding an automatic gain control, which maintains a level of gainacross a frequency spectrum. It also includes an equalizer, whichadjusts a filter at a particular frequency. A tuning mechanism iscoupled to the automatic gain control and the equalizer, and itadaptively adjusts the level of gain in the automatic gain control andthe equalizer filter. The method operates by monitoring the automaticgain control, and if the automatic gain control reaches a maximum valueand the tuning mechanism indicates more gain is required, an equalizerparameter is increased to achieve the additional gain. This is tuning byusing a saturation method.

According to another aspect of the present invention can becharacterized as a method for adaptively equalizing a signal. The methodoperates in a system including an automatic gain control, which adjustsa gain across an entire frequency spectrum. It also includes an offset,that applies an offset voltage across the entire frequency spectrum, aswell as a tuning mechanism that adaptively adjusts the automatic gaincontrol and the offset. The method operates by monitoring the offset andthe tuning mechanism. If the offset reaches a maximum value and thetuning mechanism indicates that more offset is required, the automaticgain control is adjusted to substitute for the additional offset.

One aspect of the present invention can also be characterized as amethod for adaptively equalizing a signal. The method operates bygathering a first sample after a first time interval following atransition in the signal, and gathering a second sample after a secondtime interval following the transition in the signal. Next, the methoddetermines if the signal is overdamped from the first and secondsamples. If the signal is overdamped, the system adjusts an equalizersetting to cause the equalization effect to compensate for increasedwire length, for example. The system also determines if the signal isunderdamped from the first and second samples. If the signal isunderdamped, the equalizer parameter is adjusted for example to causethe equalization effect to compensate for a decreased wire length.

Another aspect of the present invention can be characterized as a methodfor adaptively tuning the gain of a signal. The method operates bygathering samples a given time interval after certain transitions in thesignal. The method decreases an automatic gain setting if samplesgathered after transitions to a positive one are generally above apositive one value and samples gathered after transitions to a negativeone value are generally below the negative one value. The methodincreases the automatic gain if samples gathered after transitions to apositive one value are generally below the positive one value andsamples gathered after transitions to a negative one value are generallyabove (less negative than) the negative one value.

One aspect of the present invention can be characterized as a method foradaptively tuning out offsets in a signal. Offsets may be contributed bythe receive channel and are an impediment to accurate bit decisions. Themethod operates by gathering a plurality of samples a fixed timeinterval after transitions in the signal. The method decreases channeloffset if samples gathered after transitions to a positive one value aregenerally above the positive one value and samples gathered aftertransitions to a negative one value are generally above the negative onevalue. The method increases the offset if samples gathered aftertransitions to a positive one value are generally below the positive onevalue and samples gathered after transitions to a negative one value aregenerally below the negative one value. Another aspect of the presentinvention can be characterized as a method for adaptively tuning outoffsets in a signal. The method operates by gathering a plurality ofsamples a fixed time interval after transitions in the signal. Themethod decreases offset if samples in the plurality of samples gatheredafter transitions to a zero value are generally above the zero value.The method increases the offset if samples in the plurality of samplesgathered after transitions to a zero value are generally below the zerovalue.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 is a simplified diagram illustrating a signal processing channelwith tuning mechanisms according to the present invention.

FIG. 2 is a block diagram of the channel tuner state machine andsampling circuitry used in the system of FIG. 1 according to the presentinvention.

FIG. 3 is a flow chart illustrating the overequalization detectorfunction executed by the tuner of the present invention.

FIG. 4 is a flow chart of the illegal transition detector function ofthe tuner of the present invention.

FIG. 5 is a flow chart of the valid pattern watchdog detector functionfor the tuner of the present invention.

FIG. 6 illustrates the first portion of the fine tuning processaccording to the present invention.

FIG. 7 is a flow chart illustrating the equalizer tuning for the finetuning operation of the present invention.

FIG. 8 illustrates the automatic gain control and offset tuning for thefine tuning process of the present invention.

FIG. 9 illustrates an additional aspect of the offset tuning for thefine tuning process of the present invention.

FIG. 10 is a graph illustrating the case of a high offset conditionresulting in no edges in accordance with an aspect of the presentinvention.

FIG. 11 is a graph illustrating the case of a high offset resulting inillegal transitions in accordance with an aspect of the presentinvention.

FIG. 12 is a graph illustrating the case of low AGC or low equalizationresulting in no edges in accordance with an aspect of the presentinvention.

FIG. 13 is a graph illustrating the case of over equalization resultingin fast edges in accordance with an aspect of the present invention.

FIG. 14 is a graph illustrating the case of high negative offset andhigh AGC or high equalization resulting in zeros being detected asnegative one in accordance with an aspect of the present invention.

FIG. 15 is a graph illustrating the case of high offset and highequalization resulting in a one occurring only during overshoot followedby a false zero in accordance with an aspect of the present invention.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled inthe art to make and use the invention, and is provided in the context ofa particular application and its requirements. Various modifications tothe disclosed embodiments will be readily apparent to those skilled inthe art, and the general principles defined herein may be applied toother embodiments and applications without departing from the spirit andscope of the present invention. Thus, the present invention is notintended to be limited to the embodiments shown, but is to be accordedthe widest scope consistent with the principles and features disclosedherein.

FIG. 1 is a simplified diagram of a signal processing channel includingchannel offset, automatic gain control (AGC) and equalizing functionssuch as used according to the present invention for high speedcommunication channel. Thus an input signal requiring equalization isreceived on line 10 from a communication medium. The input signal isapplied to a signal processing channel 11 that includes offsetadjustment, automatic gain control functions, and equalizer functions.The output of the signal processing channel is applied on line 12 to asignal sampler and level detect circuit 13 which translates theequalized analog signal on line 12 into sampled output on line 14. Inthis example, the analog signal on line 12 encodes data in a three levelMLT3 data pattern.

The system according to the present invention also includes a feedbackpath which includes a connection on line 15 to a channel tuner statemachine 16. The channel tuner state machine 16 responds to the signalsampler and level detect circuit 13 to provide control signals on line17 for adjustment of the offset, automatic gain control circuit, andequalizer functions of the signal processing channel 11.

FIG. 2 is a block diagram of the channel tuner state machine and sampleraccording to the present invention. The sampler 20 (corresponding toblock 13 of FIG. 1) receives the equalizer signal output from line 14 ofFIG. 1, as well as reference voltages V1, V2, V3, V4 and V5 for the MLT3signal code. The reference voltages V1-V5 include a high positivethreshold such as about 1.0 volts, an intermediate positive thresholdsuch as about 0.5 volts, a ground reference voltage, a negativeintermediate reference voltage such as about -0.5 volts, and a negativehigh reference voltage such as about -1.0 volts. The sampler 20 includescomparators which compare the channel output signal on line 12 with thereference voltages. Sampler 20 operates to detect a transition in thesignal on line 12 and upon detection of a transition generates a firstsample signal on line 21 a first time interval of less than one bittime, such as about 4 nanoseconds after the transition in a 125 MHz MLT3signal, and a second sample signal on line 22 at a time intervalthereafter of about 1 bit period, such as about 8 nanoseconds. Also, thesampler generates an output for each bit period indicating whether thesample signal represents a positive 1 on line 23, a zero on line 24, anda negative 1 on line 25.

The five signals on lines 21-25 are supplied to a fine tuning circuitry26. The signals on lines 23-25 are supplied to an overequalizationdetector 27, a valid data pattern detector 28, and an illegal codesequence monitor 29 used for coarse tuning.

The output of the fine tuning circuit is applied on line 30 to tunerregisters and update logic 31. The outputs of the overequalizationdetector 27 are applied on line 32 to the tuner registers and updatelogic 31. The output of the valid data pattern detector 28 is applied online 33 to the tuner registers and update logic 31. The output of theillegal code sequence monitor 29 is applied on line 34 to the tunerregisters and update logic 31. The system also includes a tuningsaturation detector 38 which monitors the offset, AGC and equalizerparameters to detect saturation, and applies a control signal on line 39to the tuner registers and update logic 31. The tuner registers andupdate logic 31 apply control signals for adjusting the offset of thesignal processing channel on line 35, for adjusting the automatic gaincontrol on line 36, and for adjusting the equalizer on line 37 to thesignal processing channel 11.

The tuner registers and update logic 31 operate to adjust parametersassociated with automatic gain control, offset and equalization for anadjustable data channel. Increasing the automatic gain control parameterresults in an increase in the level of gain. Decreasing the automaticgain control parameter results in a decrease in the level of gain. Theoffset of the channel refers to a DC level of the output. Increasing anddecreasing the offset parameter results in increasing and decreasing,respectively, an amount of DC signal applied to the channel to adjustthe offset to a preferred level--typically zero offset. The equalizationfunction operates to compensate for distortion in the input signal whichvaries over the frequency range of the data channel. For example, asignal which traverses a longer cable length typically suffers moredegradation at higher frequencies than at lower frequencies. Thus, inthis application, an increase in the equalization parameter results inan increase in the compensation to handle the greater signal degradationcaused by longer cable lengths, for example by increasing the gain ofthe channel at higher frequencies. Likewise, decreasing the equalizationparameter results in a decrease in compensation, for example by reducingthe gain at higher frequencies.

The automatic gain control, offset adjustment and equalizer in the datachannel can be implemented using techniques known in the art, includinganalog implementations in which the parameters are used to affect analogcomponents in the channel, digital signal processing implementations, inwhich the parameters are used as arguments in the channel processingalgorithms, and combinations of analog and digital implementations.

Tuning Methods

The present invention uses both coarse and fine tuning methods. Thecoarse methods are meant to allow the tuner to converge over all initialsettings in a rapid manner. Coarse tuning adjusts the equalizer so thatthe output starts to resemble MLT3 data patterns. Coarse tuning operatesby using an illegal code sequence monitor 29, an over equalized detector27, a data pattern recognition monitor 28, and a saturation conditionmonitor 38. The illegal code sequence monitor 29 looks for 1 0 1, or -10 -1 transitions characteristic of high offsets. The over equalizeddetector 27 looks for fast rise and fall times, a characteristic of highequalization. The data pattern recognition monitor 28 uses a "watch dog"timer, and verifies that valid waveforms for tuning are being receivedduring expected intervals. This prevents the tuner from getting stuck ina metastable condition. The saturation condition monitor 38 detects whenone of the settings reaches its maximum or minimum value and the tuneris still trying to increment or decrement the setting, respectively.

The illegal code sequence monitor 29, over equalized detector 27, andsaturation condition monitor 38 run continuously. However, once thesystem is in fine tune mode, these events will not occur. Data patternrecognition 28 is disabled after the first 330 microseconds for thisembodiment because it operates statistically, and certain data patternsthat it looks for may not occur during normal operation. For example, inunscrambled mode, certain data patterns are absent during inter-packetgaps. To prevent instability due to spurious triggering of the datapattern recognition tuner and also to enable operation in unscrambledmode, the data pattern recognition is switched off after the first 330microseconds. Of course, the watchdog interval is adjusted to match theparticular use of the invention.

Fine tuning 26 runs continuously, even during coarse tuning. The finetuning methods minimize ISI to maintain an optimum output waveform whenthe coarse tuning methods stop working. The fine tuning methodsadditionally hold the waveform tuned in during system operation.

Coarse Tune Methods

Over Equalized Detector

Over equalized waveforms have fast rise and fall times, which cause thezeros in 1, 0, -1 or -1, 0, 1 transition sequences to have a short timedurations at zero. The nominal duration for a typical zero in an MLT3signal for 100 Base-X and FDDI is one baud time, or 8 nS±jitter at 125MHz. If the duration of a zero drops to less than 4 nS, then thewaveform is over equalized. See FIG. 13.

In one embodiment, the over equalized detector operates by sampling theoutput comparators in the sampling circuits on both the rising andfalling edges of the 125 MHz clock. A counter increments every time theintermediate zero value is less than 4 nS in this example and thewaveform transitions from a positive one to a negative one, orvice-versa. If the counter reaches eight, then the equalizer isdecremented (adjusted to compensate for a shorter communication medium,or a medium which introduces less distortion and thus requires "less"equalization) and the counter is reset to gather fresh data.

FIG. 3 illustrates one example of the overequalization detectorfunction. Thus the process begins at block 100. The process involvessampling the signal on the rising and falling edge of a signal rateclock 101 (i.e. every 4 nS for 125 MHz clock). The overequalizationdetector looks for transitions from +1 to -1 or from -1 to +1 withoutintervening zeros as indicated at block 102. If such transition occurs,then the overequalization counter is incremented (compensate for greatermedium length or for greater distortion introduced by the medium) (block103). If the overequalization counter overflows as indicated at block104, then the equalizer value is decremented by a coarse tune value(block 105). Next, the overequalization counter is cleared (block 106),and the process returns (block 107). If at block 102, an illegaltransition is not detected, or if at block 104, no overflow is detected,then the process returns to continue monitoring for illegal transitions(block 108).

Illegal Code Sequence Monitor

In one embodiment, a high offset condition is detected by looking forillegal code sequences, such as 1,0,1 or -1,0,-1. If a number, forexample eight, of these events occur consecutively, the offset isdecremented or incremented, respectively. See FIG. 11.

FIG. 4 illustrates a block diagram of the illegal code sequence detectorbeginning at block 200. The process first looks for a sequence of eventsthat transition from +1 to 0 back to +1 at block 201. If such illegaltransition occurs, then a positive illegal transition counter isincremented (block 202). If such code sequences are not detected, thenthe process determines whether a -1, 0, -1 illegal code sequence isdetected at block 203. If neither of these illegal code sequences aredetected, then the process returns (block 204) to continue monitoringfor illegal code sequences. If the -1, 0, -1 code sequence was detectedat block 203, then a negative illegal code sequence counter isincremented (block 205).

Returning to block 202, after incrementing of the positive illegal codesequence counter, the process determines whether there has been acounter overflow (block 206). If not, then the algorithm returns tocontinue monitoring for illegal code sequences (block 207). If anoverflow is detected, such as eight illegal code sequences, then thealgorithm decrements the offset value by a coarse tune value, andincrements the automatic gain control parameter by a fine tune value(block 208). After adjusting the parameters, the positive illegal codesequence counter is cleared (block 209) and the algorithm returns tocontinue monitoring for illegal code sequences.

Returning to block 205, after incrementing the negative illegal codesequence counter the process determines whether an overflow is detected(block 211). If not the process returns (block 212). If the overflow isdetected, then the offset is incremented by a coarse tune value and theautomatic gain control is incremented by one (block 213). Next thenegative illegal code sequence counter is cleared (block 214). Finallythe algorithm returns to continue monitoring (block 215).

Valid Pattern "Watch Dog"

The purpose of a valid pattern counter is to ensure that valid datapatterns are occurring on a regular basis. In one embodiment, valid datapatterns are defined to be three or more consecutive 1's, 0's, or -1's.Fine tune samples are taken on valid data patterns only. A "regularbasis" is a statistically determined amount of time in which valid datapatterns should have occurred. Valid patterns are guaranteed to occurduring scrambled idles. However, they are not guaranteed to occur inpackets, and they do not happen during unscrambled idles. For thisreason, the valid counter only operates for the first 330 microsecondsafter signal detect (See, IEEE 802.3u specification) has been asserted.If valid data patterns are occurring then, fine tune will bring thewaveform into convergence. Otherwise, one of the following conditionsexist: no-edge, no-valid-zero, or no-valid-one.

To determine if valid data patterns are occurring in a MLT3 signal,flags are set when a valid positive one, a valid zero, or a validnegative one occurs. If all three of these flags are not set by the timea timer expires, then one or more valid patterns are deemed to havefailed to occur, and one of the following actions will be taken.

If the timer expires and no valid flags are set, no edges are occurring.In this instance, the signal is sampled to see if the waveform is abovethe 0 to 1 comparator threshold (e.g. +0.5v), below the 0 to -1threshold (e.g. -0.5v), or in between. In the event that the signal isabove the 0 to 1 threshold, for example the offset is lowered by 4relative settings and AGC is increased by 1 setting. If the signal isbelow the 0 to -1 threshold, the offset is increased by 4 relativesettings and the AGC is increased by one relative setting. If the signalis in between, then the gain is increased by increasing the equalizer bysix relative settings and the AGC by four relative settings.

If the timer expires and valid positive ones and valid negative onesflags are set, but the valid zero flag is not set, the waveform isexperiencing too much gain and/or offset. For this case, AGC is loweredby one relative setting, and the offset is not changed since there is noway to determine which direction to adjust it. By lowering AGC only,either illegal code sequences will start occurring or fine tuning willbegin, thereby allowing the waveform to converge.

If the timer expires and either the valid positive one flag or the validnegative one flag did not get set, the offset is adjusted. If no validnegative ones occurred, then the offset is lowered. If no valid positiveones occurred, then the offset is increased. See FIG. 14.

FIG. 5 illustrates the process executed by the valid pattern watchdogfor this example beginning at block 300. First the algorithm begins bysetting the timer to the test interval (block 301). The process thenmonitors for a number N of consecutive values, such as consecutive +1'sat block 302, consecutive 0's at block 303, or consecutive -1's at block304. After detection of consecutive +1's a +1 flag is set at block 305.After detection of consecutive 0's, a 0 flag is set at block 306. Afterdetection of consecutive -1's, a -1 flag is set (block 307).

After monitoring for consecutive values, the process determines whetherthe timer is expired (block 308). If it has not expired, the processcontinues monitoring. If the timer has expired, then the timer is reset(block 309) and the process begins to evaluate the flags set at steps305-307.

The algorithm first determines whether all flags are set (block 310). Ifthey are all set, then the channel is in good condition (block 311). Ifthey are not all set, then the process determines whether the +1 flag isset but not the 0 flag, or the -1 flag is set but not the 0 flag (block312). If this condition is detected, then there is no valid 0 detected,and the automatic gain control parameter is reduced by a small valuesuch as 1 relative setting (block 313). If this condition is notdetected, then the algorithm questions whether the 0 flag is set but notthe +1 flag or not the -1 flag are set (block 314). If this condition isdetected, then there are no valid ±1's. In this case the offset isadjusted down if there are no valid +1's, or up if there are no valid-1's (block 315). If this condition is not detected, then the conditionis no flags are set as indicated at block 316. In this case, there is noedge being detected and a sample of the signal is made. If the signal isabove the intermediate positive threshold, then the offset is decreasedby a coarse value and the automatic gain control is increased slightly.If the value is below an intermediate negative threshold, then theoffset is increased by a coarse value and the automatic gain control isincremented. If the signal sample is in between the intermediatenegative and intermediate positive thresholds, then the equalizer isincreased by the coarse value and the automatic gain control isincreased by a coarse value.

Saturation Events

In the event that the AGC setting saturates at its maximum or minimumsetting and the tuning algorithm requires more or less gain,respectively, the additional gain is provided by incrementing ordecrementing, respectively, the equalizer parameter settings.

In the event that the offset saturates and the tuning algorithm requiresmore or less offset, the AGC parameter setting is incremented. If theoffset saturates in either direction, then AGC parameter increases. Inthe event that the offset saturates, the AGC parameter is incremented toenable one of the other coarse tune events to happen or to ensure thatboth positive and negative ones occur.

Fine Tune Methods

In one embodiment, the fine tune methods operate by sampling a postequalizer MLT3 signal with comparators at V/2 and -V/2 volts and at +V,-V, and 0.0 volts, where V is 1.0 volts for example. This samplingmethod looks for three or more positive ones, zeros, or negative ones ina row. Samples are then taken on the first and second clocks after theoutput of the comparators switch. The optimum sampling window for thefirst sample is approximately 0 to 4 nS after the edge for a 125 MHzMLT3 signal. The second sample is taken 8 nS (one bit period) after thefirst sample. It looks for patterns that have run lengths greater thanor equal to 3 bits. The third bit is important since it ensures that thesecond sample does not land on a switching edge.

Equalization fine tuning is based on the fact that for an underequalized waveform the transitions from 1 to 0 or -1 to 0 have an "overdamped" quality. The transient edge is slow. The greater the degree ofunder equalization, the larger the settling time. Over equalizedwaveforms conversely tend to behave as `under damped` signals withsignificant overshoot but negligible ringing. The first sample measuresthis overshoot or undershoot to tune the equalizer.

The second sample in the waveform is taken on the second clock edge,after the comparators switch, to allow the waveform time to settle. Thissample is used to qualify the first equalization sample. The sameapplies for instances where the output of the comparators switch to +1or -1. The second sample in this case is compared to the high positiveor high negative references respectively, and is used to tune the AGC.

Offset can be tuned in two ways. A first method examines the secondsample taken for valid zero patterns. It takes the second sample afterthe comparator switches to zero and a bit pattern at least three zeroslong occurs. This second sample is compared to zero volts. Dependingupon whether it is higher or lower, the offset is adjusted. A secondmethod examines the second sample taken for data patterns of three ormore consecutive ones or negative ones. If the second sample is higherthan the high positive threshold (for ones) or higher than the highnegative threshold (for negatives ones) on average, the offset islowered. If the second sample is lower than the high positive threshold(for ones) or lower than the high negative threshold (for negativesones) on average, the offset is raised.

The state machine looks for a series of three or more continuous ones,zeros or negative ones to indicate a valid data pattern. When a validdata pattern occurs, the samples are passed to a 25 MHz state machine.If the sample is a 1, 1, 1 or a -1, -, -1 data pattern, the signal oneis asserted. For such samples the signal polarity indicates whether thedata pattern was 1, 1, 1 or a -1, -1 , -1. If the samples were taken ona 0, 0, 0 data pattern, signal one is deasserted. Polarity now tellswhether the samples were taken after a 1 to 0 edge or a -1 to 0 edge.The signal invalid is asserted if the first sample failed to occur inthe optimum 4 nS sampling window.

In one embodiment, information is exchanged between the 25 MHz and 125MHz clock boundary by a handshake mechanism such that any transfer ofinformation is followed by an acknowledgment. Once the 25 MHz statemachine acknowledges that it received the sample, the process isrestarted. Valid samples are ignored while the 125 MHz state machine ispassing data to the 25 MHz state machine and waiting for anacknowledgment.

FIG. 6 illustrates the monitoring of the fine tuning circuitry beginningat block 400. First the algorithm searches for one of a number ofconsecutive +1's 401, a number of consecutive 0's 402, and a number ofconsecutive -1's 403. If any one of these conditions is detected, thenthe polarity, the one, and invalid signals are set based on the previoussamples. Also the samples S1 and S2 taken of the transition whichproceeded the consecutive data values, are passed to the fine tuningmechanism.

FIGS. 7, 8 and 9 illustrate the fine tuning processes.

Equalizer Tuning

In one embodiment, equalizer tuning is based on samples taken at zeroand upon the polarity of the previous one. The first sample is taken inthe first four nanosecond window after a transition. The second sampleis taken in the second bit time 8 nS later. The first sample is used todetermine if the waveform is underdamped or overdamped. A counter isupdated if both the first and second samples are equal. If the twosamples are different, no updates are made. The counter increments ifthe polarity of the previous one was positive and the samples are bothgreater than the threshold voltage (0 volts for MLT3), or if thepolarity of the previous one was negative and the samples were below thethreshold, which indicates the signal is under equalized. The counterdecrements if the polarity of the previous one was positive and thesamples are both less than the threshold voltage, or if the polarity ofthe previous one was negative and both the samples were above thethreshold, which indicates the signal is over equalized. If the countersaturates at plus or minus eight, the equalizer setting is incrementedor decremented, respectively and the counter is reset to zero. The countof eight was a trade-off between quick response time, and adequateaveraging over a number of samples.

FIG. 7 illustrates the equalizer tuning process for a detection ofconsecutive 0's beginning at block 500. The algorithm first determineswhether S1 is not equal to S2 (block 501). Thus, if the signals areequal, then the process returns to continue monitoring (block 502). Ifthey are not equal, then a counter DVDT counter is incremented if thepolarity signal was positive, and S1 and S2 were above the highthreshold, or if the polarity was negative and the samples S1 and S2were below the high threshold. The counter DVDT is decreased thepolarity is positive and S1 and S2 were below the intermediatethreshold, or if the polarity was negative, and the signals S1 and S2were above the high threshold (block 503). After adjusting the DVDTcounter, the process determines whether the counter has saturated in apositive direction, such as by reaching +4 (block 504). If it hassaturated, then the equalizer value is incremented and the counter isreset (block 505). If the DVDT counter saturated in the negativedirection, such as by reaching -4 as indicated at the test at block 506,then the equalizer value is decremented (block 507) and the counter isreset. If the DVDT counter has not saturated in either direction, thenthe process returns (block 508).

AGC/Offset Tuning

In one embodiment, AGC fine tuning looks at samples taken at the highpositive and negative reference (+1.0V and -1.0V). Plus and minus 1 areused in the following discussion for simplicity. The +1.0V samples areaveraged in counter PCNT and the -1.0V samples are averaged in NCNT. Fora 1, 1, 1 data pattern, if the second sample taken by the +1.0comparator is greater than 1.0, PCNT increments, else it decrements. Fora -1, -1, -1 data pattern, if the second sample taken by the -1.0Vcomparator is greater than -1.0V, NCNT increments, else it decrements.If both of these counters saturate at plus or minus four, the settingsare updated. If PNCT goes to plus 4 and NCNT goes to minus 4, then AGCis decremented. If PCNT goes to minus 4 and NCNT goes to plus 4, thenAGC is incremented and the counters are reset. The count of fourprovides quick response time and adequate averaging. This count iscomparable to the EQ count since there are two counters here which mustsaturate.

In one embodiment, offset tuning occurs in one of two ways: based onones, or based on zeros. Offset tuning based on ones is similar to AGCtuning. If both PCNT and NCNT saturate at four then the offset isdecremented, if both saturate at negative four, then the offset isincremented. Offset tuning based on zeros checks the second sample takenby the comparator at 0 for a 0, 0, 0 data pattern. If this sample isabove zero, a counter, OFFCNT, is incremented, else it is decremented.When OFFCNT saturates, the offset settings are updated and OFFCNT isreset.

FIG. 8 illustrates the fine AGC tuning and offset tuning for thecondition of consecutive 1's or consecutive -1's beginning at block 600.

The process determines whether the second sample is greater than thehigh positive threshold, or less than a high negative threshold (block601). If the sample is greater than the high threshold for a positivevalue or less than the negative threshold for a negative value, then thepositive counter PCNT or negative counter NCNT are incremented (block602). If the samples are not above their threshold for a positive valueor below their threshold for a negative value, then the counters PCNT orNCNT are decremented respectively (block 603).

Next the algorithm determines whether one of four saturation conditionshas occurred in the counters PCNT or NCNT. The first saturationcondition is tested at block 604 to determine whether the PCNT counterhas saturated at the positive maximum while the NCNT counter hassaturated at the negative maximum. If this condition occurs, then theautomatic gain control parameter is decremented and the PCNT and NCNTcounters are reset (block 605). Next the algorithm detects whether thePCNT saturated at a negative maximum and the NCNT saturated at apositive maximum at block 606. If this condition is detected, then theautomatic gain control is incremented and the counters are reset (block607).

The next condition involves both counters saturating at the positivevalue as indicated at block 608. If this condition occurs, the offsetvalue is decreased, and the counters are reset (block 609). The finalcondition detects whether both counters have saturated at the negativemaximum (block 610). If this condition occurs, then the offset isincreased and the counters are reset (block 611). If none of the foursaturation conditions are detected, then the process returns to continuemonitoring (block 612).

FIG. 9 illustrates the balance of the offset tuning which occurs upondetection of the consecutive 0 condition beginning at block 700. Theprocess determines whether the sample S2 is greater than 0 at block 701.If it is greater than 0, then an offset counter OFFCNT is decreased(block 702). If the value is not greater than 0, then the counter OFFCNTis increased (block 703). Next, the process determines whether thecounter OFFCNT has saturated at the negative extreme (block 704). Ifthis condition occurs, then the offset value is increased and thecounter is reset (block 705). Next the process determines whether thecounter OFFCNT has saturated a positive direction (block 706). If thiscondition occurs, then the offset value is decreased and the counter isreset (block 707). If neither of the saturation conditions is detected,then the process returns to continue monitoring (block 708).

FIGS. 10 through 15 illustrate a variety of tuning problems which ariseduring the equalization process in accordance with an aspect of thepresent invention. FIG. 10 illustrates the case of a high offsetresulting in no edges. This condition is defined by the fact that notransitions are occurring at comparators set at the intermediatepositive and negative thresholds (0.5, -0.5). The signal is one ornegative one constantly. To remedy the situation, the tuner reduces theoffset until transitions begin. Note that this condition is independentof equalizer or AGC settings.

FIG. 11 illustrates a high offset condition resulting in illegaltransitions in accordance with an aspect of the present invention. Thiscondition is defined by transitions such as 1, 0, 1 OR -1, 0, -1. Thesetransitions are invalid under MLT3, because MLT3 requires that thesignal pass through zero while alternating between one and negative one.This condition is corrected by reducing the offset and optionallyincreasing AGC.

FIG. 12 illustrates the case of low AGC and/or low equalizationresulting in no edges. Under this condition, no transitions occur andthe signal is constantly at zero. To remedy this situation, the AGC andequalization are increased.

FIG. 13 illustrates the case of over equalization resulting in fastedges. This condition is defined by transitions from one to negative oneand from negative one to one in less than four nanoseconds (half a bitperiod). This condition is remedied by reducing the equalizer setting.

FIG. 14 illustrates the case of a high offset and high AGC orequalization resulting in zeros being detected as ones. Under thiscondition, positive ones and negative ones are properly recorded.However, zeros are detected as positive or negative ones. Thetransitions from one to zero are too slow to be detected by the overequalization detector. Ultimately, the valid count will expire,resulting in a no-valid-zero condition. This results in the AGC beingreduced.

FIG. 15 illustrates the case of high offset and high equalizationresulting in a one occurring only during overshoot followed by a falsezero. Under this case, negative ones occur only during an overshoot inan over equalized waveform. This results in valid transitions, howeverfine tune does not get three negative ones in a row. Hence, the validcount will expire, with a no-valid-ones condition, and the offset willconsequently be reduced.

In the claims that follow, the term "approximately" is used with certainvoltages and times. The term "approximately" refers to a range involtage or time around a specific value. For example, approximately zerovolts may mean any voltage greater than -0.5 volts and lower than 0.5volts in a tri-level voltage system that has voltage values of 1.0, 0and -1.0 volts. The claims also use the terms "generally above" or"generally below." These terms mean that on average, or most of thetime, a value is respectively above or below a specific value.

The foregoing description of a preferred embodiment of the invention hasbeen presented for purposes of illustration and description. It is notintended to be exhaustive or to limit the invention to the precise formsdisclosed. Obviously, many modifications and variations will be apparentto practitioners skilled in this art. It is intended that the scope ofthe invention be defined by the following claims and their equivalents.

What is claimed is:
 1. A method for adaptively equalizing a signal,comprising:gathering a first sample after a first time intervalfollowing a transition in the signal; gathering a second sample after asecond time interval following the transition in the signal; determiningif the signal is overdamped from the first and second samples; if thesignal is overdamped, increasing an equalizer parameter; determining ifthe signal is underdamped from the first and second samples; and if thesignal is underdamped, decreasing the equalizer parameter.
 2. The methodof claim 1, wherein:if the transition involves a decrease in voltage andthe first and second samples are above a first threshold the signal isdetermined to be overdamped; if the transition involves an increase involtage and the first and second samples are below a second thresholdthe signal is determined to be overdamped; if the transition involves adecrease in voltage and the first and second samples are below the firstthreshold the signal is determined to be underdamped; and if thetransition involves an increase in voltage and the first and secondsamples are above the second threshold the signal is determined to beunderdamped.
 3. The method of claim 1, wherein the increasing of theequalizer parameter takes place after the signal is determined to beunder equalized a plurality of times.
 4. The method of claim 1, whereinthe decreasing of the equalizer parameter takes place after the signalis determined to be over equalized a plurality of times.
 5. The methodof claim 1, wherein the first time interval is within one bit time afterthe transition.
 6. The method of claim 1, wherein the second timeinterval is within two bit times after the transition.
 7. The method ofclaim 1, wherein the signal includes an MT3 signal.
 8. The method ofclaim 1, wherein the signal includes a binary NRZ signal.
 9. The methodof claim 1, wherein the signal is taken from the output of an equalizer.10. The method of claim 1, wherein the transition is to a zero value,from one of a positive one value and a negative one value.
 11. A methodfor adaptively equalizing a signal, comprising:gathering a first sampleafter a first time interval following a transition in the signal;gathering a second sample after a second time interval following thetransition in the signal; determining if the signal is under equalizedfrom the first and second samples; if the signal is under equalized,increasing an equalizer parameter; determining if the signal is overequalized from the first and second samples; and if the signal is overequalized, decreasing the equalizer parameter.
 12. A method foradaptively equalizing a signal, comprising:gathering a plurality ofsamples a time interval after transitions in the signal; decreasing anautomatic gain parameter if samples in the plurality of samples gatheredafter transitions to a positive one value are generally above thepositive one value, and samples in the plurality of samples gatheredafter transitions to a negative one value are generally below thenegative on value; and increasing the automatic gain parameter ifsamples in the plurality of samples gathered after transitions to apositive one value are generally below the positive one value, andsamples in the plurality of samples gathered after transitions to anegative one value are generally above the negative one value.
 13. Themethod of claim 12, wherein samples gathered after transitions to apositive one value are generally above the positive one value if moresamples are above than below the positive one value.
 14. The method ofclaim 12, wherein samples gathered after transitions to a negative onevalue are generally below a negative one value if more samples are belowthan above the negative one value.
 15. The method of claim 12, whereinsamples gathered after transitions to a positive one value are generallybelow the positive one value if more samples are below than above thepositive one value.
 16. The method of claim 12, wherein samples gatheredafter transitions to a negative one value are generally above a negativeone value if more samples are above than below the negative one value.17. The method of claim 12, wherein the signal includes an MLT3 signal.18. The method of claim 12, wherein the signal includes a binary NRZsignal.
 19. The method of claim 12, wherein the signal is taken from theoutput of an equalizer.
 20. A method for adaptively equalizing a signal,comprising:gathering a plurality of samples a time interval after aplurality of transitions in the signal; decreasing an offset parameterif samples in the plurality of samples gathered after transitions to apositive one value are generally above the positive one value, andsamples in the plurality of samples gathered after transitions to anegative one value are generally above the negative on value; andincreasing the offset parameter if samples in the plurality of samplesgathered after transitions to a positive one value are generally belowthe positive one value, and samples in the plurality of samples gatheredafter transitions to a negative one value are generally below thenegative on value.
 21. The method of claim 20, wherein the signalincludes an MLT3 signal.
 22. The method of claim 20, wherein the signalincludes a binary NRZ signal.
 23. The method of claim 20, wherein thesignal is taken from the output of an equalizer.
 24. A method foradaptively equalizing a signal, comprising:gathering a plurality ofsamples a time interval after a plurality of transitions in the signal;decreasing an offset parameter if samples in the plurality of samplesgathered after transitions to a zero value are generally above the zerovalue; and increasing the offset parameter if samples in the pluralityof samples gathered after transitions to a zero value are generallybelow the zero value.
 25. The method of claim 24, wherein the signalincludes an MLT3 signal.
 26. The method of claim 24, wherein the signalincludes a binary NRZ signal.